<template>
    <Table :columns="columns14" :data="data5" border :span-method="handleSpan"></Table>
</template>
<script>
export default {
  data () {
    return {
      columns14: [
        {
          title: '地区',
          key: 'area',
          align: 'center',
          width: 150
        },
        {
          title: '社区(村)数量',
          key: 'sqcsl',
          align: 'center',
          width: 150
        },
        {
          title: '朝鲜族人口数',
          key: 'cxzrks',
          align: 'center',
          width: 150
        },
        {
          title: '到国外就学就业探亲人数',
          key: 'address',
          align: 'center',
          width: 150
        },
        {
          title: '已从境外外来返人数',
          key: 'address',
          align: 'center',
          width: 150
        },
        {
          title: '3月4月计划来返人数',
          key: 'address',
          align: 'center',
          width: 150,
          children: [
            {
              title: '3月',
              key: 'street',
              align: 'center',
              width: 150
            },
            {
              title: '4月',
              key: 'street',
              align: 'center',
              width: 150
            }]
        },
        {
          title: '3月有准确订票信息的人数',
          key: 'address',
          align: 'center',
          width: 150
        },
        {
          title: '3月有准确订票信息的人数',
          key: 'address',
          align: 'center',
          width: 150
        }
      ],
      data5: [
        {
          name: '省内转运小计',
          age: 18,
          address: 'New York No. 1 Lake Park',
          date: '2016-10-03'
        },
        {
          name: '省外转运小计',
          age: 24,
          address: 'London No. 1 Lake Park',
          date: '2016-10-01'
        },
        {
          name: '当日转运总计',
          age: 30,
          address: 'Sydney No. 1 Lake Park',
          date: '2016-10-02'
        }
      ]
    }
  },
  methods: {
    handleSpan ({ row, column, rowIndex, columnIndex }) {
      if (rowIndex === 0 && columnIndex === 1) {
        return [1, 1]
      } else if (rowIndex === 0 && columnIndex === 2) {
        return [0, 0]
      } else if (rowIndex === 0 && columnIndex === 3) {
        return [0, 0]
      }
    }
  }
}
</script>
